package owl2vowl.export.types;

import owl2vowl.export.types.Exporter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class FileExporter implements Exporter {
	private File destinationFile;

	public FileExporter(File destinationFile) {
		this.destinationFile = destinationFile;
	}

	public void write(String text) throws IOException {
		boolean i = false;

		while (this.destinationFile.exists()) {
			this.destinationFile.delete();
		}

		FileWriter writer = new FileWriter(this.destinationFile);
		writer.write(text);
		writer.close();
	}
}